<%@page pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%String baseUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/"; %>
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.messager.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/bootstrap.min.js"></script>
<jsp:include page="../admin_head.jsp">
	<jsp:param value="用户信息" name="title" />
</jsp:include>
</head>
<!-- <body style="background-image: url('../res/images/001.jpg'); background-repeat: no-repeat;"> -->
<body>
	<div class="container-fluid" >
		<div class="row">
			<div class="col-md-2"></div>
			<div class="col-md-8">
				<div class="panel panel-success" align="center">
				<div class="panel-heading">
				<h1>课堂教学质量评价系统</h1><br/>当前用户:${user.nickName }&nbsp;&nbsp;&nbsp;
						当前用户角色：${user.userRole }
				&nbsp;&nbsp;&nbsp;&nbsp;<a href="userlist.action?userId=${user.id }"><button class="btn btn-sm btn-success">首页</button></a>
						<a href="${pageContext.request.contextPath }/user/user.action"> <button class="btn btn-sm btn-danger" > <B> 退出登录 </B> </button> </a></div>
				</div>
			
			<jsp:include page="../user/admin_nav.jsp">
					<jsp:param value="用户界面" name="title" />
				</jsp:include>
				<div class="panel panel-success">
				<div  style="margin-left: 300px;width:900px ; margin-top:15px" class="panel panel-primary">
					<div class="panel-heading"> <h3 class="panel-title">用户信息</h3> </div>
					<div class="panel-body" align="center">
						<form method="post" action="edit_do.action">
							<input type="hidden" name="userId" value="${user.id }">
							<div style="width: 400px; ">
								<div class="input-group">
									<span class="input-group-addon">姓名</span> 
									<input type="text" name="nickName" value="${user.nickName }" class="form-control" placeholder="请输入用户名">
								</div>
							</div>
							<div style="width: 400px; ">
								<div class="input-group">
									<span class="input-group-addon">登录帐号</span> 
									<input type="text" name="username" value="${user.username }" class="form-control" placeholder="请输入登录帐号">
								</div>
							</div>
							<div style="width: 400px;">
								<div class="input-group">
									<span class="input-group-addon">登录密码</span> 
									<input type="text" name="password" value="${user.password }" class="form-control" placeholder="请输入登录密码">
								</div>
							</div>
							<div style="width: 400px;">
								<div class="input-group">
									<span class="input-group-addon">
									<c:if test="${user.userType eq 1 }">学号</c:if>
									<c:if test="${user.userType ne 1 }">工号</c:if>
									</span> 
									<input readonly="readonly" type="text" name="userCode" value="${user.userCode }" class="form-control" placeholder="请输入用编号">
								</div>
							</div>
							<div style="width: 400px;">
								<div class="input-group">
									<span class="input-group-addon">
									职业
									</span> 
									<input readonly="readonly" type="text" name="userRole" value="${user.userRole }" class="form-control">
								</div>
							</div>
							<div style="width: 400px;">
								<div class="input-group" >
									<span class="input-group-addon">所属专业（院系）</span> 
									<select class="form-control" name="departmentId">
										<c:if test="${departmentList ne null}">
											<c:forEach items="${departmentList}" var="depart" varStatus="vs">
											<c:if test="${user.department eq depart.id }">
											<option value="${depart.id}" selected="selected">${user.departmentName}</option>
											</c:if>
											<c:if test="${user.department ne depart.id }">
												<option value="${depart.id}" >${depart.name}</option>
											</c:if>
											</c:forEach>
										</c:if>
									</select>
								</div>
							</div>
							<div style="width: 400px;">
								<div class="input-group" >
									<span class="input-group-addon">性别</span> 
									<select class="form-control" name="sex">
										<c:if test="${user.sex==1}">
											<option value="1" selected="selected">男</option>
											<option value="2">女</option>
										</c:if>
										<c:if test="${user.sex==2}">
											<option value="1">男</option>
											<option value="2" selected="selected">女</option>
										</c:if>
									</select>
								</div>
							</div>
							<div style="width: 400px;">
								<div class="input-group" >
									<span class="input-group-addon">邮箱</span> 
									<input type="email" name="email" value="${user.email }" class="form-control" placeholder="请输入邮箱">
								</div>
							</div>
							<div style="width: 400px;">
								<div class="input-group" >
									<span class="input-group-addon">电话</span> 
									<input type="number" name="phone" value="${user.phone }" class="form-control" placeholder="请输入电话">
								</div>
							</div>
							<button class="btn btn-primary" style="width: 400px; margin-top: 30px;" type="submit">提交</button>
						</form>
						<a href="userlist.action?userId=${user.id }">
						<button class="btn btn-default" style="width: 400px; margin-top: 20px;">返回</button>
						</a>
</div>
					</div>
				</div>
			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
	
</body>
</html>